﻿package mortal.game.view.guild.cellrender
{
    import com.gengine.utils.*;
    import com.mui.controls.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.view.common.*;
    import mortal.game.view.guild.util.*;

    public class GuildResourceAllotTipRenderer extends GCellRenderer
    {
        private var _name:GTextFiled;
        private var _warehouseNum:GTextFiled;
        private var _allotNum:GTextFiled;

        public function GuildResourceAllotTipRenderer()
        {
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            var _loc_2:* = ItemConfig.instance.getConfig(int(param1.data));
            this._name.htmlText = HTMLUtil.addColor(_loc_2.name, ColorConfig.instance.getItemColorString(_loc_2.color));
            this._warehouseNum.text = GuildResourceRecordUitl.instance.getNotEnoughMapNum(_loc_2.code).toString();
            this._allotNum.text = GuildResourceRecordUitl.instance.getItemNnm(_loc_2.code).toString();
            return;
        }// end function

        override public function set label(param1:String) : void
        {
            super.label = "";
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._name = UIFactory.gTextField("", 0, 20, 120, 20, this, GlobalStyle.textFormatBai.center());
            this._warehouseNum = UIFactory.gTextField("", 120, 20, 65, 20, this, GlobalStyle.textFormatBai.center());
            this._allotNum = UIFactory.gTextField("", 185, 20, 65, 20, this, GlobalStyle.textFormatBai.center());
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._name.dispose(param1);
            this._warehouseNum.dispose(param1);
            this._allotNum.dispose(param1);
            return;
        }// end function

    }
}
